package com.adjaisd.scarecrow.testJava;

import com.adjaisd.scarecrow.service.BoardService;
import com.adjaisd.scarecrow.vo.BoardQuotaData;
import com.adjaisd.scarecrow.vo.BoardQuotaVO;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class testBoard {

    @Autowired
    BoardService boardService;

    @Test
    void testGetPreviewData() {
        String quotaName = "光照";
        String unit = "lx";
        String deviceIdList = "1";
        String beg = "2022-04-22";
        String end = "2022-04-28";
        int type = 2;
        BoardQuotaVO previewData = boardService.getPreviewData(1L, quotaName, unit, deviceIdList, beg, end, type);
        System.out.println(previewData.getXData());
        for (BoardQuotaData series : previewData.getSeries()) {
            System.out.println(series);
        }
    }
}
